package com.ktgj.customer.mapper;

import java.util.List;

import com.ktgj.customer.domain.*;
import com.ktgj.customer.domain.vo.WholeMallOrderVO;
import org.apache.ibatis.annotations.Param;

/**
 * 订单Mapper接口
 * 
 * @author ruoyi
 * @date 2022-05-30
 */
public interface MallOrderMapper 
{
    /**
     * 查询订单
     * 
     * @param orderId 订单ID
     * @return 订单
     */
    public MallOrder selectMallOrderById(Long orderId);

    /**
     * 查询订单列表
     * 
     * @param mallOrder 订单
     * @return 订单集合
     */
    public List<MallOrder> selectMallOrderList(MallOrder mallOrder);

    /**
     * 新增订单
     * 
     * @param mallOrder 订单
     * @return 结果
     */
    public int insertMallOrder(MallOrder mallOrder);

    /**
     * 修改订单
     * 
     * @param mallOrder 订单
     * @return 结果
     */
    public int updateMallOrder(MallOrder mallOrder);

    /**
     * 删除订单
     * 
     * @param orderId 订单ID
     * @return 结果
     */
    public int deleteMallOrderById(Long orderId);

    /**
     * 批量删除订单
     * 
     * @param orderIds 需要删除的数据ID
     * @return 结果
     */
    public int deleteMallOrderByIds(Long[] orderIds);

    /**
     * 通过订单编号查询
     * @param orderUniqueCode
     * @return
     */
    public MallOrder queryOrderByOrderUniqueCode(String orderUniqueCode);

    /**
     * 后台订单列表
     * @param search
     * @return
     */
    public List<MallOrderBackstage> mallOrderList(MallOrderSearch search);

    /**
     * 后台订单详情
     * @param orderId
     * @return
     */
    public MallOrderBackstageDetails orderBackstageDetails(Long orderId);

    /**
     * APP订单列表
     * @param customerId
     * @param status
     * @return
     */
    public List<WholeMallOrder> wholeMallOrder(@Param("customerId") Long customerId, @Param("status") String status);

    /**
     * 查询所有待支付的订单
     * @return
     */
    public List<MallOrder> selectMallOrderByStatus();

    /**
     * APP订单详情
     * @param orderId
     * @return
     */
    public WholeMallOrderVO mallOrderDetails(Long orderId);
}
